export default {
  namespaced: true,
  state: {
    searchList: '',
    location:''
  },
  getters: {
    searchList(state) {
      return state.searchList || uni.getStorageSync('searchList');
    },
    location(state) {
      return state.location || uni.getStorageSync('union-location');
    },
  },
  mutations: {
    setSearchList(state, data) {
      state.searchList = data;
      uni.setStorageSync('searchList', data);
    },
    setLocation(state, data) {
      state.location = data;
      uni.setStorageSync('union-location', data);
    },
  },
};
